package cn.doitedu.test;

import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.RandomUtils;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Random;

public class EventDataBenchMark {
    public static void main(String[] args) throws IOException {

        BufferedWriter bw = new BufferedWriter(new FileWriter("d:/ev_bench.txt"));

        // g02,e1,p1:v1_p2:v2,8
        for (int i = 0; i < 1000000; i++) {

            int ev_cnt = RandomUtils.nextInt(10, 80);
            for (int j = 0; j < ev_cnt; j++) {
                String ev = RandomStringUtils.randomAlphabetic(1, 2) + RandomUtils.nextInt(0, 10);

                String p1 = RandomUtils.nextInt(0, 15) + "";
                String v1 = RandomUtils.nextInt(0, 10) + "";

                String p2 = RandomUtils.nextInt(0, 15) + "";
                String v2 = RandomUtils.nextInt(0, 10) + "";

                bw.write("g0"+i+","+ev+","+p1+":"+v1+"_"+p2+":"+v2+","+RandomUtils.nextInt(10, 80)+"\n");
            }
            bw.flush();
        }

        bw.close();
    }
}
